package kr.hkit.powerjava.chther21;

public class ArrayError {
	public static void main(String[] args) {
		int[]  array = {1,2,3,4,5};
		int i=0;
		
		try {
			for(i=0;i<=array.length;i++){
				System.out.println(array[i]+"");
			}	
		} catch (/*ArrayIndexOutOfBounds*/Exception e) {
			// TODO: handle exception
			System.out.println("인덱스"+i+"사용불가"+e.getMessage());
			e.printStackTrace();
		}
	}
}
